package by.apiskun.curex.services;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import by.apiskun.curex.datamodel.User;

public interface UserService {

	User get(Long id);

	Long getCount();

	List<User> getAllUsers();

	List<User> getAllUsersByFirstName(String firstName);

	List<User> getAllUsersByLastName(String lastName);

	List<User> getAllUsersByMidName(String midName);

	List<User> getAllUsersByFullName(String firstName, String midName,
			String lastName);

	@Transactional
	void updateUserPassword(Long id, String newPassword);

	@Transactional
	void updateUserPhoneNumber(Long id, String newPhoneNumber);

	@Transactional
	void updateUserLock(Long id, Boolean newUserLock);

	@Transactional
	void saveOrUpdate(User user);

	@Transactional
	void delete(User user);

	@Transactional
	void deleteAll();

	User getUserByLogin(String login);

	List<String> getRoles(Long userId);

}
